﻿/*
 * Globalize
 *
 * http://github.com/jquery/globalize
 *
 * Copyright Software Freedom Conservancy, Inc.
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 */
(function(m,r){var v,e,x,n,y,z,l,o,s,q,j,i,w,t,p,h,c,g,u,a,f,k,b,d;
v=function(A){return new v.prototype.init(A)
};
if(typeof require!=="undefined"&&typeof exports!=="undefined"&&typeof module!=="undefined"){module.exports=v
}else{m.Globalize=v
}v.cultures={};
v.prototype={constructor:v,init:function(A){this.cultures=v.cultures;
this.cultureSelector=A;
return this
}};
v.prototype.init.prototype=v.prototype;
v.cultures["default"]={name:"en",englishName:"English",nativeName:"English",isRTL:false,language:"en",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSizes:[3],"+":"+","-":"-",NaN:"NaN",negativeInfinity:"-Infinity",positiveInfinity:"Infinity",percent:{pattern:["-n %","n %"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"$"}},calendars:{standard:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss"}}},messages:{}};
v.cultures["default"].calendar=v.cultures["default"].calendars.standard;
v.cultures.en=v.cultures["default"];
v.cultureSelector="en";
e=/^0x[a-f0-9]+$/i;
x=/^[+-]?infinity$/i;
n=/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/;
y=/^\s+|\s+$/g;
z=function(D,C){if(D.indexOf){return D.indexOf(C)
}for(var B=0,A=D.length;
B<A;
B++){if(D[B]===C){return B
}}return -1
};
l=function(A,B){return A.substr(A.length-B.length)===B
};
o=function(C){var A,E,I,H,G,J,B=arguments[0]||{},D=1,F=arguments.length,C=false;
if(typeof B==="boolean"){C=B;
B=arguments[1]||{};
D=2
}if(typeof B!=="object"&&!q(B)){B={}
}for(;
D<F;
D++){if((A=arguments[D])!=null){for(E in A){I=B[E];
H=A[E];
if(B===H){continue
}if(C&&H&&(j(H)||(G=s(H)))){if(G){G=false;
J=I&&s(I)?I:[]
}else{J=I&&j(I)?I:{}
}B[E]=o(C,J,H)
}else{if(H!==r){B[E]=H
}}}}}return B
};
s=Array.isArray||function(A){return Object.prototype.toString.call(A)==="[object Array]"
};
q=function(A){return Object.prototype.toString.call(A)==="[object Function]"
};
j=function(A){return Object.prototype.toString.call(A)==="[object Object]"
};
i=function(A,B){return A.indexOf(B)===0
};
w=function(A){return(A+"").replace(y,"")
};
t=function(A){return isNaN(A)?NaN:A|0
};
p=function(C,A,B){var D;
for(D=C.length;
D<A;
D+=1){C=(B?("0"+C):(C+"0"))
}return C
};
h=function(G,C){var D=0,B=false;
for(var F=0,A=G.length;
F<A;
F++){var E=G.charAt(F);
switch(E){case"'":if(B){C.push("'")
}else{D++
}B=false;
break;
case"\\":if(B){C.push("\\")
}B=!B;
break;
default:C.push(E);
B=false;
break
}}return D
};
c=function(A,B){B=B||"F";
var C,E=A.patterns,D=B.length;
if(D===1){C=E[B];
if(!C){throw"Invalid date format string '"+B+"'."
}B=C
}else{if(D===2&&B.charAt(0)==="%"){B=B.charAt(1)
}}return B
};
g=function(A,Q,K){var R=K.calendar,V=R.convert;
if(!Q||!Q.length||Q==="i"){var G;
if(K&&K.name.length){if(V){G=g(A,R.patterns.F,K)
}else{var P=new Date(A.getTime()),T=f(A,R.eras);
P.setFullYear(k(A,R,T));
G=P.toLocaleString()
}}else{G=A.toString()
}return G
}var W=R.eras,Z=Q==="s";
Q=c(R,Q);
G=[];
var M,Y=["0","00","000"],L,J,S=/([^d]|^)(d|dd)([^d]|$)/g,F=0,N=a(),C;
function aa(af,ae){var ac,ad=af+"";
if(ae>1&&ad.length<ae){ac=(Y[ae-2]+ad);
return ac.substr(ac.length-ae,ae)
}else{ac=ad
}return ac
}function H(){if(L||J){return L
}L=S.test(Q);
J=true;
return L
}function ab(ac,ad){if(C){return C[ad]
}switch(ad){case 0:return ac.getFullYear();
case 1:return ac.getMonth();
case 2:return ac.getDate()
}}if(!Z&&V){C=V.fromGregorian(A)
}for(;
;
){var D=N.lastIndex,B=N.exec(Q);
var O=Q.slice(D,B?B.index:Q.length);
F+=h(O,G);
if(!B){break
}if(F%2){G.push(B[0]);
continue
}var E=B[0],U=E.length;
switch(E){case"ddd":case"dddd":var I=(U===3)?R.days.namesAbbr:R.days.names;
G.push(I[A.getDay()]);
break;
case"d":case"dd":L=true;
G.push(aa(ab(A,2),U));
break;
case"MMM":case"MMMM":var X=ab(A,1);
G.push((R.monthsGenitive&&H())?R.monthsGenitive[U===3?"namesAbbr":"names"][X]:R.months[U===3?"namesAbbr":"names"][X]);
break;
case"M":case"MM":G.push(aa(ab(A,1)+1,U));
break;
case"y":case"yy":case"yyyy":X=C?C[0]:k(A,R,f(A,W),Z);
if(U<4){X=X%100
}G.push(aa(X,U));
break;
case"h":case"hh":M=A.getHours()%12;
if(M===0){M=12
}G.push(aa(M,U));
break;
case"H":case"HH":G.push(aa(A.getHours(),U));
break;
case"m":case"mm":G.push(aa(A.getMinutes(),U));
break;
case"s":case"ss":G.push(aa(A.getSeconds(),U));
break;
case"t":case"tt":X=A.getHours()<12?(R.AM?R.AM[0]:" "):(R.PM?R.PM[0]:" ");
G.push(U===1?X.charAt(0):X);
break;
case"f":case"ff":case"fff":G.push(aa(A.getMilliseconds(),3).substr(0,U));
break;
case"z":case"zz":M=A.getTimezoneOffset()/60;
G.push((M<=0?"+":"-")+aa(Math.floor(Math.abs(M)),U));
break;
case"zzz":M=A.getTimezoneOffset()/60;
G.push((M<=0?"+":"-")+aa(Math.floor(Math.abs(M)),2)+":"+aa(Math.abs(A.getTimezoneOffset()%60),2));
break;
case"g":case"gg":if(R.eras){G.push(R.eras[f(A,W)].name)
}break;
case"/":G.push(R["/"]);
break;
default:throw"Invalid date format pattern '"+E+"'.";
break
}}return G.join("")
};
(function(){var A;
A=function(N,J,O){var L=O.groupSizes,P=L[0],E=1,F=Math.pow(10,J),I=Math.round(N*F)/F;
if(!isFinite(I)){I=N
}N=I;
var G=N+"",M="",Q=G.split(/e/i),D=Q.length>1?parseInt(Q[1],10):0;
G=Q[0];
Q=G.split(".");
G=Q[0];
M=Q.length>1?Q[1]:"";
var C;
if(D>0){M=p(M,D,false);
G+=M.slice(0,D);
M=M.substr(D)
}else{if(D<0){D=-D;
G=p(G,D+1);
M=G.slice(-D,G.length)+M;
G=G.slice(0,-D)
}}if(J>0){M=O["."]+((M.length>J)?M.slice(0,J):p(M,J))
}else{M=""
}var B=G.length-1,K=O[","],H="";
while(B>=0){if(P===0||P>B){return G.slice(0,B+1)+(H.length?(K+H+M):M)
}H=G.slice(B-P+1,B+1)+(H.length?(K+H):"");
B-=P;
if(E<L.length){P=L[E];
E++
}}return G.slice(0,B+1)+K+H+M
};
u=function(E,M,C){if(!isFinite(E)){if(E===Infinity){return C.numberFormat.positiveInfinity
}if(E===-Infinity){return C.numberFormat.negativeInfinity
}return C.numberFormat.NaN
}if(!M||M==="i"){return C.name.length?E.toLocaleString():E.toString()
}M=M||"D";
var B=C.numberFormat,L=Math.abs(E),I=-1,J;
if(M.length>1){I=parseInt(M.slice(1),10)
}var G=M.charAt(0).toUpperCase(),K;
switch(G){case"D":J="n";
L=t(L);
if(I!==-1){L=p(""+L,I,true)
}if(E<0){L="-"+L
}break;
case"N":K=B;
case"C":K=K||B.currency;
case"P":K=K||B.percent;
J=E<0?K.pattern[0]:(K.pattern[1]||"n");
if(I===-1){I=K.decimals
}L=A(L*(G==="P"?100:1),I,K);
break;
default:throw"Bad number format specifier: "+G
}var H=/n|\$|-|%/g,D="";
for(;
;
){var F=H.lastIndex,N=H.exec(J);
D+=J.slice(F,N?N.index:J.length);
if(!N){break
}switch(N[0]){case"n":D+=L;
break;
case"$":D+=B.currency.symbol;
break;
case"-":if(/[1-9]/.test(L)){D+=B["-"]
}break;
case"%":D+=B.percent.symbol;
break
}}return D
}
}());
a=function(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g
};
f=function(C,A){if(!A){return 0
}var B,E=C.getTime();
for(var D=0,F=A.length;
D<F;
D++){B=A[D].start;
if(B===null||E>=B){return D
}}return 0
};
k=function(D,A,E,B){var C=D.getFullYear();
if(!B&&A.eras){C-=A.eras[E].offset
}return C
};
(function(){var B,C,D,G,E,F,A;
B=function(H,J){if(J<100){var L=new Date(),K=f(L),I=k(L,H,K),M=H.twoDigitYearMax;
M=typeof M==="string"?new Date().getFullYear()%100+parseInt(M,10):M;
J+=I-(I%100);
if(J>M){J-=100
}}return J
};
C=function(H,I,J){var M,L=H.days,K=H._upperDays;
if(!K){H._upperDays=K=[A(L.names),A(L.namesAbbr),A(L.namesShort)]
}I=F(I);
if(J){M=z(K[1],I);
if(M===-1){M=z(K[2],I)
}}else{M=z(K[0],I)
}return M
};
D=function(K,J,N){var O=K.months,I=K.monthsGenitive||K.months,M=K._upperMonths,L=K._upperMonthsGen;
if(!M){K._upperMonths=M=[A(O.names),A(O.namesAbbr)];
K._upperMonthsGen=L=[A(I.names),A(I.namesAbbr)]
}J=F(J);
var H=z(N?M[1]:M[0],J);
if(H<0){H=z(N?L[1]:L[0],J)
}return H
};
G=function(T,S){var V=T._parseRegExp;
if(!V){T._parseRegExp=V={}
}else{var L=V[S];
if(L){return L
}}var K=c(T,S).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),J=["^"],U=[],H=0,I=0,O=a(),Q;
while((Q=O.exec(K))!==null){var P=K.slice(H,Q.index);
H=O.lastIndex;
I+=h(P,J);
if(I%2){J.push(Q[0]);
continue
}var N=Q[0],X=N.length,M;
switch(N){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":M="(\\D+)";
break;
case"tt":case"t":M="(\\D*)";
break;
case"yyyy":case"fff":case"ff":case"f":M="(\\d{"+X+"})";
break;
case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":M="(\\d\\d?)";
break;
case"zzz":M="([+-]?\\d\\d?:\\d{2})";
break;
case"zz":case"z":M="([+-]?\\d\\d?)";
break;
case"/":M="(\\"+T["/"]+")";
break;
default:throw"Invalid date format pattern '"+N+"'.";
break
}if(M){J.push(M)
}U.push(Q[0])
}h(K.slice(H),J);
J.push("$");
var W=J.join("").replace(/\s+/g,"\\s+"),R={regExp:W,groups:U};
return V[S]=R
};
E=function(H,I,J){return H<I||H>J
};
F=function(H){return H.split("\u00A0").join(" ").toUpperCase()
};
A=function(H){var J=[];
for(var I=0,K=H.length;
I<K;
I++){J[I]=F(H[I])
}return J
};
b=function(K,L,ak){K=w(K);
var X=ak.calendar,Y=G(X,L),P=new RegExp(Y.regExp).exec(K);
if(P===null){return null
}var V=Y.groups,O=null,aj=null,an=null,H=null,T=null,ad=0,af,M=0,ah=0,I=0,ac=null,al=false;
for(var aa=0,ao=V.length;
aa<ao;
aa++){var ai=P[aa+1];
if(ai){var ae=V[aa],W=ae.length,J=parseInt(ai,10);
switch(ae){case"dd":case"d":H=J;
if(E(H,1,31)){return null
}break;
case"MMM":case"MMMM":an=D(X,ai,W===3);
if(E(an,0,11)){return null
}break;
case"M":case"MM":an=J-1;
if(E(an,0,11)){return null
}break;
case"y":case"yy":case"yyyy":aj=W<4?B(X,J):J;
if(E(aj,0,9999)){return null
}break;
case"h":case"hh":ad=J;
if(ad===12){ad=0
}if(E(ad,0,11)){return null
}break;
case"H":case"HH":ad=J;
if(E(ad,0,23)){return null
}break;
case"m":case"mm":M=J;
if(E(M,0,59)){return null
}break;
case"s":case"ss":ah=J;
if(E(ah,0,59)){return null
}break;
case"tt":case"t":al=X.PM&&(ai===X.PM[0]||ai===X.PM[1]||ai===X.PM[2]);
if(!al&&(!X.AM||(ai!==X.AM[0]&&ai!==X.AM[1]&&ai!==X.AM[2]))){return null
}break;
case"f":case"ff":case"fff":I=J*Math.pow(10,3-W);
if(E(I,0,999)){return null
}break;
case"ddd":case"dddd":T=C(X,ai,W===3);
if(E(T,0,6)){return null
}break;
case"zzz":var U=ai.split(/:/);
if(U.length!==2){return null
}af=parseInt(U[0],10);
if(E(af,-12,13)){return null
}var Q=parseInt(U[1],10);
if(E(Q,0,59)){return null
}ac=(af*60)+(i(ai,"-")?-Q:Q);
break;
case"z":case"zz":af=J;
if(E(af,-12,13)){return null
}ac=af*60;
break;
case"g":case"gg":var N=ai;
if(!N||!X.eras){return null
}N=w(N.toLowerCase());
for(var Z=0,ab=X.eras.length;
Z<ab;
Z++){if(N===X.eras[Z].name.toLowerCase()){O=Z;
break
}}if(O===null){return null
}break
}}}var R=new Date(),ag,S=X.convert;
ag=S?S.fromGregorian(R)[0]:R.getFullYear();
if(aj===null){aj=ag
}else{if(X.eras){aj+=X.eras[(O||0)].offset
}}if(an===null){an=0
}if(H===null){H=1
}if(S){R=S.toGregorian(aj,an,H);
if(R===null){return null
}}else{R.setFullYear(aj,an,H);
if(R.getDate()!==H){return null
}if(T!==null&&R.getDay()!==T){return null
}}if(al&&ad<12){ad+=12
}R.setHours(ad,M,ah,I);
if(ac!==null){var am=R.getMinutes()-(ac+R.getTimezoneOffset());
R.setHours(R.getHours()+parseInt(am/60,10),am%60)
}return R
}
}());
d=function(B,E,D){var C=E["-"],A=E["+"],F;
switch(D){case"n -":C=" "+C;
A=" "+A;
case"n-":if(l(B,C)){F=["-",B.substr(0,B.length-C.length)]
}else{if(l(B,A)){F=["+",B.substr(0,B.length-A.length)]
}}break;
case"- n":C+=" ";
A+=" ";
case"-n":if(i(B,C)){F=["-",B.substr(C.length)]
}else{if(i(B,A)){F=["+",B.substr(A.length)]
}}break;
case"(n)":if(i(B,"(")&&l(B,")")){F=["-",B.substr(1,B.length-2)]
}break
}return F||["",B]
};
v.prototype.findClosestCulture=function(A){return v.findClosestCulture.call(this,A)
};
v.prototype.format=function(B,C,A){return v.format.call(this,B,C,A)
};
v.prototype.localize=function(B,A){return v.localize.call(this,B,A)
};
v.prototype.parseInt=function(B,C,A){return v.parseInt.call(this,B,C,A)
};
v.prototype.parseFloat=function(B,C,A){return v.parseFloat.call(this,B,C,A)
};
v.prototype.culture=function(A){return v.culture.call(this,A)
};
v.addCultureInfo=function(D,C,B){var A={},E=false;
if(typeof D!=="string"){B=D;
D=this.culture().name;
A=this.cultures[D]
}else{if(typeof C!=="string"){B=C;
E=(this.cultures[D]==null);
A=this.cultures[D]||this.cultures["default"]
}else{E=true;
A=this.cultures[C]
}}this.cultures[D]=o(true,{},A,B);
if(E){this.cultures[D].calendar=this.cultures[D].calendars.standard
}};
v.findClosestCulture=function(G){var L;
if(!G){return this.cultures[this.cultureSelector]||this.cultures["default"]
}if(typeof G==="string"){G=G.split(",")
}if(s(G)){var E,I=this.cultures,J=G,A,C=J.length,B=[];
for(A=0;
A<C;
A++){G=w(J[A]);
var D,H=G.split(";");
E=w(H[0]);
if(H.length===1){D=1
}else{G=w(H[1]);
if(G.indexOf("q=")===0){G=G.substr(2);
D=parseFloat(G);
D=isNaN(D)?0:D
}else{D=1
}}B.push({lang:E,pri:D})
}B.sort(function(N,O){return N.pri<O.pri?1:-1
});
for(A=0;
A<C;
A++){E=B[A].lang;
L=I[E];
if(L){return L
}}for(A=0;
A<C;
A++){E=B[A].lang;
do{var F=E.lastIndexOf("-");
if(F===-1){break
}E=E.substr(0,F);
L=I[E];
if(L){return L
}}while(1)
}for(A=0;
A<C;
A++){E=B[A].lang;
for(var K in I){var M=I[K];
if(M.language==E){return M
}}}}else{if(typeof G==="object"){return G
}}return L||null
};
v.format=function(B,C,A){culture=this.findClosestCulture(A);
if(B instanceof Date){B=g(B,C,culture)
}else{if(typeof B==="number"){B=u(B,C,culture)
}}return B
};
v.localize=function(B,A){return this.findClosestCulture(A).messages[B]||this.cultures["default"].messages[B]
};
v.parseDate=function(C,H,E){E=this.findClosestCulture(E);
var G,B,D;
if(H){if(typeof H==="string"){H=[H]
}if(H.length){for(var A=0,I=H.length;
A<I;
A++){var F=H[A];
if(F){G=b(C,F,E);
if(G){break
}}}}}else{D=E.calendar.patterns;
for(B in D){G=b(C,D[B],E);
if(G){break
}}}return G||null
};
v.parseInt=function(B,C,A){return t(v.parseFloat(B,C,A))
};
v.parseFloat=function(A,F,J){if(typeof F!=="number"){J=F;
F=10
}var K=this.findClosestCulture(J);
var G=NaN,M=K.numberFormat;
if(A.indexOf(K.numberFormat.currency.symbol)>-1){A=A.replace(K.numberFormat.currency.symbol,"");
A=A.replace(K.numberFormat.currency["."],K.numberFormat["."])
}A=w(A);
if(x.test(A)){G=parseFloat(A)
}else{if(!F&&e.test(A)){G=parseInt(A,16)
}else{var E=d(A,M,M.pattern[0]),B=E[0],L=E[1];
if(B===""&&M.pattern[0]!=="(n)"){E=d(A,M,"(n)");
B=E[0];
L=E[1]
}if(B===""&&M.pattern[0]!=="-n"){E=d(A,M,"-n");
B=E[0];
L=E[1]
}B=B||"+";
var C,Q,D=L.indexOf("e");
if(D<0){D=L.indexOf("E")
}if(D<0){Q=L;
C=null
}else{Q=L.substr(0,D);
C=L.substr(D+1)
}var P,S,T=M["."],R=Q.indexOf(T);
if(R<0){P=Q;
S=null
}else{P=Q.substr(0,R);
S=Q.substr(R+T.length)
}var O=M[","];
P=P.split(O).join("");
var H=O.replace(/\u00A0/g," ");
if(O!==H){P=P.split(H).join("")
}var I=B+P;
if(S!==null){I+="."+S
}if(C!==null){var N=d(C,M,"-n");
I+="e"+(N[0]||"+")+N[1]
}if(n.test(I)){G=parseFloat(I)
}}}return G
};
v.culture=function(A){if(typeof A!=="undefined"){this.cultureSelector=A
}return this.findClosestCulture(A)||this.culture["default"]
}
}(this));